package Modele;

import java.util.Date;

/***********************************************************************
 * Module:  Incident.java
 * Author:  Vincent, Benjamin
 * Purpose: Defines the Class Incident
 ***********************************************************************/

/** @pdOid 1c93f758-d320-49ec-bf07-854889655f30 */
public class Incident extends AbstractModel{
   /** @pdOid 53ff1c10-3895-44d1-a68b-37c499cc9f39 */
   private int mId;
   /** @pdOid a3a3f7f3-86fe-47c3-9a11-5594cb013d16 */
   private java.util.Date mDateOuverture;
   /** @pdOid 5e733446-ee5f-4f2b-a674-e3dc8858488a */
   private java.util.Date mDateFermeture;
   /** @pdOid 0690240f-3fbf-4410-bd3a-d099544d197c */
   private String mStatut;
   /** @pdOid 4a88b408-44ca-4ba5-8e11-3467eb680ac2 */
   private String incidentProrite;
   /** @pdOid 4042fe46-164f-4e63-80d1-75051f2041f4 */
   private java.lang.String incidentCommentaire;
   
   private Velo mVelo;
   private TypeIncident mTypInc;
   private Technicien mTechnicien;

    public Incident() {
        super();
    }

    public Incident(String mStatut, String incidentProrite, String incidentCommentaire) {
        this.mStatut = mStatut;
        this.incidentProrite = incidentProrite;
        this.incidentCommentaire = incidentCommentaire;
    }
    

    public Incident(Date mDateOuverture, Date mDateFermeture, String mStatut, String incidentProrite, String incidentCommentaire) {
        super();
        this.mId = -1;
        this.mDateOuverture = mDateOuverture;
        this.mDateFermeture = mDateFermeture;
        this.mStatut = mStatut;
        this.incidentProrite = incidentProrite;
        this.incidentCommentaire = incidentCommentaire;
    }
   
   
   /** @pdOid 7d7919ef-4dfb-42d4-9e36-91ac217048d7 */
   public int getMId() {
      return mId;
   }
   
   /** @param newMId
    * @pdOid 67d01c72-0b28-46e4-9f35-44047b064aea */
   public void setMId(int newMId) {
      mId = newMId;
   }
   
   /** @pdOid 115a54dd-ef9a-46db-a75b-919821286e57 */
   public java.util.Date getMDateOuverture() {
      return mDateOuverture;
   }
   
   /** @param newMDateOuverture
    * @pdOid 5a7a42a7-5da8-446f-8aa3-0c21391fa984 */
   public void setMDateOuverture(java.util.Date newMDateOuverture) {
      mDateOuverture = newMDateOuverture;
   }
   
   /** @pdOid 92c8f5e1-4be5-419e-b2f1-7259dc090ae2 */
   public java.util.Date getMDateFermeture() {
      return mDateFermeture;
   }
   
   /** @param newMDateFermeture
    * @pdOid cd756a74-3f9a-48b2-ad0a-9c971de11859 */
   public void setMDateFermeture(java.util.Date newMDateFermeture) {
      mDateFermeture = newMDateFermeture;
   }
   
   /** @pdOid b08d2e1e-b0fd-4245-b422-53b223403115 */
   public String getMStatut() {
      return mStatut;
   }
   
   /** @param newMStatut
    * @pdOid a8e0e8a6-0f5d-42f5-a44a-31604280f15e */
   public void setMStatut(String newMStatut) {
      mStatut = newMStatut;
   }
   
   /** @pdOid 3e08fbe1-7cbd-4c88-88a3-32b6ea66f4ca */
   public String getIncidentProrite() {
      return incidentProrite;
   }
   
   /** @param newIncidentProrite
    * @pdOid b3e263ff-43f5-49d6-a4be-05ca6275ef85 */
   public void setIncidentProrite(String newIncidentProrite) {
      incidentProrite = newIncidentProrite;
   }
   
   /** @pdOid e797e350-fdfd-425c-9c66-4aeaa9b9ec76 */
   public java.lang.String getIncidentCommentaire() {
      return incidentCommentaire;
   }
   
   /** @param newIncidentCommentaire
    * @pdOid a52a9dc3-b129-476a-88f9-73ea9a0d7901 */
   public void setIncidentCommentaire(java.lang.String newIncidentCommentaire) {
      incidentCommentaire = newIncidentCommentaire;
   }

    public Velo getmVelo() {
        return mVelo;
    }

    public void setmVelo(Velo mVelo) {
        this.mVelo = mVelo;
    }

    public TypeIncident getmTypInc() {
        return mTypInc;
    }

    public void setmTypInc(TypeIncident mTypInc) {
        this.mTypInc = mTypInc;
    }

    public Technicien getmTechnicien() {
        return mTechnicien;
    }

    public void setmTechnicien(Technicien mTechnicien) {
        this.mTechnicien = mTechnicien;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof Incident){
            return mId == ((Incident)obj).getMId();
        }else{
            return false;
        }
    }
   
   

}